package me.hl.security.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import java.util.Optional;

/**
 * Created by yy on 2016/5/10.
 */
@Controller
public class LoginController {

    @RequestMapping(value = "/login" ,method = RequestMethod.GET)
    public ModelAndView getLoginPage(@RequestParam Optional<String> error){
        return new ModelAndView("login","error",error.orElse(null));
    }

}
